﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Entity.DomainModels;
using VOL.SmartMecial.Infrastructure;
using VOL.SmartMecial.IServices.EvaluateNurseCare;

namespace VOL.SmartMecial.Services.EvaluateNurseCare
{
    public class PatientCodeService : IPatientCodeService
    {
        private readonly IBaseRepository<Patient> _patientRep;

        public PatientCodeService(IBaseRepository<Patient> patientRep)
        {
            this._patientRep = patientRep;
        }

        /// <summary>
        /// 查询患者编号
        /// </summary>
        /// <param name="PatientCode">查询患者编号</param>
        /// <returns></returns>
        public async Task<List<Patient>> GetPatientInfo(string PatientCode)
        {
            var patients = _patientRep.GetAll().Where(x => x.PatientCode == PatientCode);
            return  await  Task.FromResult(patients.ToList());
        }

       
       
    }
}
